<div class="panel-default">
  <table lay-filter="demo" lay-size='lg'>
    <thead>
      <tr>

        <th lay-data="{field:'account_number'}"><%= AdminUser.human_attribute_name(:account_number) %></th>

        <th lay-data="{field:'name'}"><%= AdminUser.human_attribute_name(:name) %></th>

        <th lay-data="{field:'phone'}"><%= AdminUser.human_attribute_name(:phone) %></th>

        <th lay-data="{field:'password'}"><%= AdminUser.human_attribute_name(:password) %></th>

        <th lay-data="{field:'operation',width:200}">操作</th>
      </tr>
    </thead>

    <tbody>
      <% @admin_users.each do |admin_user| %>
        <tr>

          <td><%= admin_user.account_number %></td>

          <td><%= admin_user.name %></td>

          <td><%= admin_user.phone %></td>

          <td><%= admin_user.password %></td>

          <td>
            <%= link_to edit_admin_admin_user_path(admin_user), remote: true, class: "layui-btn layui-btn-primary layui-border-blue layui-btn-sm" do -%>编辑<% end %>
            <%= link_to [:admin, admin_user], method: :delete, data: { confirm: '确定删除吗? 注意此操作无法撤销！' }, class: "layui-btn layui-btn-primary layui-btn-sm layui-border-red" do -%>删除<% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <%= link_to new_admin_admin_user_path, remote: true do -%><button type="button" class="layui-btn"><i class="layui-icon">&#xe608;</i> <%= t('actions.new') + AdminUser.model_name.human %></button><% end %>
  <!-- 分页 -->
  <%= render 'admin/public_views/page', record: @admin_users, record_count: @admin_users.count %>
</div>
<div id="add_admin_user" style="display: none; padding: 20px"></div>


